package com.css.fxfzcpxx.modules.courseManage.vo;

import lombok.Data;

/**
 * @Author: zhangSongRui
 * @CreateTime: 2023/03/16
 * @Description: 类型数量
 */
@Data
public class TypeManageVO {
    //主键id
    private String id;
    //类型板块
    private String typePlate;
    //类别名称
    private String typeName;
    //该类型总题数
    private String num;
    //单选数量
    private String singleOptionNum;
    //多选数量
    private String multipleSelectionNum;
    //判断数量
    private String judgmentNum;

    public void setNum(String num) {
        this.num = String.valueOf(Integer.parseInt(getSingleOptionNum()) +
                Integer.parseInt(getMultipleSelectionNum()) +
                Integer.parseInt(getJudgmentNum()));
    }

    public String getNum() {
        return String.valueOf(Integer.parseInt(getSingleOptionNum()) +
                Integer.parseInt(getMultipleSelectionNum()) +
                Integer.parseInt(getJudgmentNum()));
    }

    public String getSingleOptionNum() {
        if (null==this.singleOptionNum){
            return "0";
        }
        return singleOptionNum;
    }
    public String getMultipleSelectionNum() {
        if (null==this.multipleSelectionNum){
            return "0";
        }
        return multipleSelectionNum;
    }
    public String getJudgmentNum() {
        if (null==this.judgmentNum){
            return "0";
        }
        return judgmentNum;
    }
}
